<?php
/**
 * Created by PhpStorm.
 * User: aron
 * Date: 2019/5/10
 * Time: 8:45 PM
 */

include_once "../../Util/DebugUtil/DebugUtil.php";

DebugUtil::printDebugSeperator("ucfirst");
$result = ucfirst("hello");
echo "ucfirst(\"hello\") = {$result}";
yt_debug_print_break_line();


DebugUtil::printDebugSeperator("ucwords");
$result = ucwords("hello world");
echo "ucfirst(\"hello world\") = {$result}";
yt_debug_print_break_line();


// 去除空格 trim
DebugUtil::printDebugSeperator("trim");
$result = trim(" hello world  ");
echo "trim(\" hello world  \") = {$result}";
yt_debug_print_break_line();


// htmlentities 所有的非ASCII吗的字符转换为对应的实体
DebugUtil::printDebugSeperator("htmlentities");
$result = htmlentities("hello world 你好世界<bold>bold</bold>");
echo "htmlentities(\"hello world 你好世界<bold>bold</bold>\") = {$result}";
yt_debug_print_break_line();


DebugUtil::printDebugSeperator("strip_tags");
$result = strip_tags("<html>tag wappered content</html>");
echo "strip_tags(\"<html>tag wappered content</html>\" = {$result}";
yt_debug_print_break_line();


// nl2br
DebugUtil::printDebugSeperator("nl2br");
$result = nl2br("hello \n world");
echo "htmlentities(\"hello \n world\") = {$result}";
yt_debug_print_break_line();


// htmlspecialchars 吧HTML标记转换为HTML实体
DebugUtil::printDebugSeperator("htmlspecialchars");
$result = htmlspecialchars("<html> &'  nl2br</html>");
echo "htmlspecialchars(\"<html> \&\'  nl2br</html>\") = {$result}";
yt_debug_print_break_line();




